home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene 96
/
Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso
/
misc
/
coding
/
dp_asmdc
/
deepcryp.asm
< prev
next >
Wrap
Assembly Source File
|
1996-12-08
|
7KB
|
319 lines
────────────────────────────────────────────────────────────────────────────────
; we need a crypter for the deep dialer! a good crypter...lets say we use a
; 1024 bit key for a inverted xor-algorhytm but with an included selfdecrypt
; routine...plasmoid...diz program is know as the deep-dialer!
────────────────────────────────────────────────────────────────────────────────
.model tiny
code segment use16
assume cs:code,ds:code
org 100h
locals
deepcrypter: jmp main
────────────────────────────────────────────────────────────────────────────────
.386 ; ∙ here we go again...
────────────────────────────────────────────────────────────────────────────────
install proc near
mov ah,42h
mov al,2
xor cx,cx
xor dx,dx
int 21h
mov leng,ax
sub ax,4
mov word ptr newbytes[2],ax
mov ah,42h
mov al,0
xor cx,cx
xor dx,dx
int 21h
mov ah,3fh
mov cx,4
mov dx,offset oldbytes
int 21h
mov ax,word ptr oldbytes[0]
cmp ax,03646h
jne notequal
mov dx,offset erro_alread
call message
notequal: mov ah,42h
mov al,0
xor cx,cx
xor dx,dx
int 21h
mov ah,40h
mov cx,4
mov dx,offset newbytes
int 21h
mov ah,42h
mov al,2
xor cx,cx
xor dx,dx
int 21h
mov ah,40h
mov dx,offset decrypt
mov cx,offset deend-offset decrypt
int 21h
ret
newbytes dd 0000e990h
leng dw 0
install endp
────────────────────────────────────────────────────────────────────────────────
decrypt proc near
call get_ip
get_ip: pop cx
mov bp,cx
sub bp,offset get_ip
sub cx,103h
mov si,100h
lea di,[bp+oldbytes]
mov eax,[di]
mov [si],eax
lea di,[bp+key]
mov dx,di
mov bx,di
add bx,31
decrypting: mov al,[si]
xor al,[di]
not al
mov [si],al
inc di
inc si
cmp di,bx
jbe denochange
mov di,dx
denochange: loop decrypting
push 0100h
ret
oldbytes dd 0
key db 41,32,63,94,75,34,47,18,79,85,53,26,12,82,24,12
db 64,24,65,25,25,96,87,58,59,68,34,32,34,44,35,35
deend label byte
decrypt endp
────────────────────────────────────────────────────────────────────────────────
backup proc near
mov ah,3ch
mov dx,offset backname
mov cx,00
int 21h
jnc what
mov dx,offset erro_intern
call message
what: mov dx,offset mess_create
call message
mov bp,ax
xchg bx,bp
mov dx,offset mess_backup
call message
backing: xchg bx,bp
mov ah,42h
mov al,00
mov cx,word ptr point[2]
mov dx,word ptr point[0]
int 21h
jnc err1
mov dx,offset erro_corrup
call message
err1: mov ah,3fh
mov cx,50000
mov dx,offset buffer
int 21h
push ax
xchg bp,bx
mov ah,42h
mov al,00
mov cx,word ptr point[2]
mov dx,word ptr point[0]
int 21h
pop ax
mov cx,ax
mov ah,40h
mov dx,offset buffer
int 21h
jnc err2
mov dx,offset erro_corrup
call message
err2: add point,50000
cmp ax,50000
je backing
mov ah,3eh
int 21h
ret
backup endp
────────────────────────────────────────────────────────────────────────────────
getname proc near
mov si,80h
mov di,offset backname
xor ch,ch
mov cl,[si]
cmp cl,5
ja maybecom
mov dx,offset erro_syntax
call message
maybecom: add si,2
dec cx
push si
mov dx,cx
rep movsb
mov di,offset filename
pop si
mov cx,dx
rep movsb
mov di,offset backname
mov cx,dx
searchcom1: cmp dword ptr [di],"moc."
je found
inc di
loop searchcom1
mov di,offset backname
mov cx,dx
searchcom2: cmp dword ptr [di],"MOC."
je found
inc di
loop searchcom2
mov dx,offset erro_onlyco
call message
found: mov eax,"kab."
mov [di],eax
ret
getname endp
────────────────────────────────────────────────────────────────────────────────
message proc near
push ax
push dx
clc
mov ah,09
int 21h
jnc noerr6
mov dx,offset erro_intern
mov ah,09
int 21h
mov ah,4ch
int 21h
noerr6: cmp dx,offset erro_syntax
jb nofault
mov ah,4ch
int 21h
nofault: pop dx
pop ax
ret
message endp
────────────────────────────────────────────────────────────────────────────────
openfile proc near
mov ah,3dh
mov dx,offset filename
mov al,02
int 21h
jnc okay
mov dx,offset erro_nofile
call message
okay: mov dx,offset mess_openin
call message
mov bx,ax
ret
filename db 128 dup (0)
backname db 128 dup (0)
point dd 0
openfile endp
────────────────────────────────────────────────────────────────────────────────
cryptit proc near
xchg bp,bx
mov dx,offset mess_crypti
call message
mov point,0
loading: mov ah,42h
mov al,00
mov cx,word ptr point[2]
mov dx,word ptr point[0]
int 21h
mov ah,3fh
mov cx,50000
mov dx,offset buffer
int 21h
jnc err3
mov dx,offset erro_corrup
call message
err3: push ax
mov cx,ax
mov di,offset key
mov si,offset buffer
crypting: mov al,[si]
xor al,[di]
not al
mov [si],al
inc di
inc si
cmp di,offset key+31
jbe nochange
mov di,offset key
nochange: loop crypting
mov ah,42h
mov al,00
mov cx,word ptr point[2]
mov dx,word ptr point[0]
int 21h
pop ax
mov cx,ax
mov ah,40h
mov dx,offset buffer
int 21h
jnc err4
mov dx,offset erro_corrup
call message
err4: add point,50000
cmp ax,50000
jnb loading
ret
buffer db 50000 dup (0)
cryptit endp
────────────────────────────────────────────────────────────────────────────────
closefile proc near
mov dx,offset mess_closin
call message
mov ah,3eh
int 21h
ret
closefile endp
────────────────────────────────────────────────────────────────────────────────
mess_crypta db 0dh,0ah
db " ┌────────── · · ──┐",0dh,0ah
db " │ ≡ dΣΣP-CRyPTeR By PLaSMoiD/dΣΣP V.01ß ≡ │",0dh,0ah
db " └── · · ──────────┘",0dh,0ah,"$"
mess_openin db " ■ opening file for encryption",0dh,0ah,"$"
mess_create db " ■ creating file for backuping",0dh,0ah,"$"
mess_backup db " ■ backuping file to .bak-file",0dh,0ah,"$"
mess_crypti db " ■ crypting using 256 bit key!",0dh,0ah,"$"
mess_instal db " ■ installing deep decryptcode",0dh,0ah,"$"
mess_closin db " ■ closing file...completed...",0dh,0ah,"$"
erro_syntax db " ■ error! run crypter filename",0dh,0ah,"$"
erro_onlyco db " ■ error! only com can be used",0dh,0ah,"$"
erro_nofile db " ■ error! could not found file",0dh,0ah,"$"
erro_corrup db " ■ error! file may be corrupt!",0dh,0ah,"$"
erro_alread db " ■ error! file already crypted",0dh,0ah,"$"
erro_intern db " ■ error! internal error...;)!",0dh,0ah,"$"
────────────────────────────────────────────────────────────────────────────────
main: mov dx,offset mess_crypta
call message
call getname
call openfile
call backup
call cryptit
call install
call closefile
ret
code ends
────────────────────────────────────────────────────────────────────────────────
end deepcrypter